package com.farm.command;

import com.farm.equipment.Equipment;

public class StartWorkCommand implements Command {
    private Equipment equipment;

    public StartWorkCommand(Equipment equipment) {
        this.equipment = equipment;
    }


    public void setEquipment(Equipment equipment) {
        this.equipment = equipment;
    }

    @Override
    public void execute() {
        System.out.println("执行开始工作命令");
        equipment.work();
    }

    @Override
    public void undo() {
        System.out.println("撤销开始工作命令");
        equipment.stop();
    }
} 